package com.ktjy.mapper;

import com.ktjy.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SysUserMapper {
    public int count();
    public int getUserCountByRoleId(@Param("roleId") Integer roleId);
    public int deleteUsersByRoleId(@Param("roleId") Integer roleId);
    public List<SysUser> getUserList();
    public List<SysUser> getUsersByRealName(String realName);
    public List<SysUser> getUserListByPojo(SysUser sysUser);
    public List<SysUser> getUserListByMap(Map<String, Object> userMap);
    public List<SysUser> getUserListWithRoleName(SysUser sysUser);
    public int add(SysUser sysUser);
    public List<SysUser> getUserListByRoleId(@Param("roleId") Integer roleId);
    public int update(SysUser sysUser);
    public int updatePwd(@Param("id") Integer id, @Param("password") String pwd);
    public int delete(int id);
    public List<SysUser> getUserAndAddressesByUserId(@Param("userId") Integer userId);
    public List<SysUser> selectList(@Param("realName")String realName,@Param("roleId")Integer roleId);
    public List<SysUser> selectListByChoose(@Param("realName")String realName,@Param("roleId")Integer roleId,@Param("account") String account,@Param("createTime") String createTime);
    public List<SysUser> selectListByRoleIdArray(Integer[] roleIds);
    public List<SysUser> selectListByRoleIdList(List<Integer> roleList);
}
